﻿<div class="span12">
    <div class="widget-box">
        <div class="widget-title">
            <span class="icon"><i class="icon-list-alt"></i></span>
            <h5>权限信息查询</h5>
        </div>
        <div class="widget-content">
            <form name='adminRoleForm' class="form-horizontal" role="form">
                <div class="form-group">

                    <div class="col-lg-4 tag-horizontal">
                        <div class="col-lg-2">
                            <label class="text-right inline pull-label s-label-len" for="adminRole">角色</label>
                        </div>

                        <div class="col-lg-10">
                            <select class="m-wrap form-control" id="adminRole" name="adminRole" ng-change="onChange()" ng-model="adminRole" ng-options="s.AdminRoleGuid as s.RoleName for s in adminRoles">
                                <option value="">(请选择)</option>
                            </select>
                        </div>
                    </div>

                </div>

            </form>
        </div>
    </div>
    <div class="widget-box" id="permissionList">
        <div class="widget-title">
            <span class="icon"><i class="icon-reorder"></i></span>
            <h5>权限信息列表</h5>
        </div>

        <div id="successAlert" class="alert alert-success" style="display:none;"></div>
        <div id="warningAlert" class="alert alert-warning" style="display:none;"></div>

        <div class="widget-content table-responsive">
            <div class="form-group" style="float: right;" ng-if="adminRole">
                <a ng-click='onSave()' class="btn btn-primary"><i class="icon-save"></i>保存</a>
            </div>
            <table ng-table="tableParams" class="table table-striped table-bordered table-hover">
                <thead class="panel panel-default">
                    <tr class="panel-heading">
                        <th class="hidden-480">菜单名称</th>
                        <th class="hidden-480">是否拥有权限</th>
                        <th class="hidden-480" style="display:block;cursor: pointer;" ng-click="onChkCol()" ng-disabled="!adminRole"><input type="checkbox" class="icon-white" ng-checked="isSelected" ng-disabled="!adminRole"><span style="vertical-align: -4px;margin-left: 10px;cursor: pointer;">{{isSelected?'取消全选':'全选'}}</span></th>
                    </tr>
                </thead>
                <tbody>
                    <tr class="odd gradeX" ng-repeat='item in $data'>
                        <td class="hidden-480" style="text-align:left;">
                            <span ng-if="item.IsNode==false" class="td-span-line"></span>
                            <span class="td-span-node"></span>
                            <span>{{item.MenuName}}</span>
                        </td>
                        <td class="hidden-480" style="text-align:left;">
                            <span>{{item.Checked|permStatusFilter}}</span>
                        </td>
                        <td class="hidden-480" style="width:10%;">
                            <input type="checkbox" ng-model="item.Checked" ng-click="onSelCol(item)"/>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
